<?php
/**
*
*	后台首页 @zairwolf
*/
if(!defined('IN_ACP')) exit('Access Denied');

//相关版本
$phpver = PHP_VERSION;
$phpos = PHP_OS;
$dbversion = db_ver();
//相关时间
$servertime = gmdate('Y-m-d H:i:s', TIMESTAMP);
$thistime = rdate(TIMESTAMP, 'Y-m-d H:i:s');

$adminonline = db_rows("select acp_name from rd8_session_acp");

//检测gd
$jpgspt=0;
if(function_exists('gd_info')) {
	$gdinfo=gd_info();
	if($gdinfo['JPG Support']) $jpgspt= 1;
}
//Mysql容量
$dbsize = 0;
$tables = db_rows("SHOW TABLE STATUS LIKE '$db_prefix%'");
foreach($tables as $table) {
	$dbsize += $table['Data_length'] + $table['Index_length'];
}
$dbsize = $dbsize ? sizecount($dbsize) : '未知';

//显示
$tpl = new T($ptype.'_'.$pfile);
$tpl->assign("C_servertime",$servertime);
$tpl->assign("C_thistime",$thistime);
$tpl->assign("C_timeblock",$_SYSTEM['SYSTEM']['TIME_ZONE']);
$tpl->assign("C_timedelay",$_SYSTEM['SYSTEM']['TIME_DELAY']);
$tpl->assign("admins",$adminonline);
$tpl->assign("C_dbversion",$dbversion);
$tpl->assign("C_phpver",$phpver);
$tpl->assign("C_phpos",$phpos);
$tpl->assign("C_dbsize",$dbsize);
$tpl->assign("C_jpgspt",$jpgspt);
$tpl->output();
